home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 25
/
AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso
/
PublicDomain
/
Spiele
/
SSheep
/
Developers
/
SSheep.AMOS
/
SSheep.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1994-07-29
|
11KB
|
444 lines
Screen Open 0,640,20,2,Hires
Palette $0,$FFF
Curs Off : Flash Off : Hide
Print "Shivering Sheep V1.1 by Lee Hesselden of Satanic Dreams"
Wait 50
'
' +-----------------+
' | SHIVERING SHEEP |
' +-----------------+
'
' IFF PICTURES:
'
' 10 - Playing Area
' 11 - Level Complete
' 12 - Score Panel
' 13 - Title Screen
' 15 - Game Over
'
BEG:
MOUSE=0 : EXL=2500 : PISS=1
Track Play 3
'
Screen Open 2,640,256,16,Hires : Cls 0
Screen Open 4,320,240,32,Lowres : Cls 0
If FIRST=0 Then Goto STORY
Goto SETUP
'
STORY:
Screen Open 1,640,256,16,Hires : Cls 1 : Paper 0 : Pen 1
Screen Display 1,,130,,
Unpack 12,0,0
Get Palette 0,1
Palette $0,$EEE,0,$4D,0,$F40
'
Rainbow Del : Hide
Restore TEKST : Read N : Dim TE$(N)
For X=1 To N : Read TE$(X) : Next
'
Screen Open 0,640,N*8+256,2,Hires : Curs Off : Cls 0
Colour 0,$0 : Colour 1,$0
SPEED=3
'
For I=1 To N : Print TE$(I) : Next
Set Rainbow 0,1,3000,"(16,1,16)","(16,1,16)","(16,1,16)"
EFX
Rainbow 0,,0,256
Screen Display 0,128,300,320,255
'
Screen Display 0,,280,,
Screen Offset 0,0,0
For Y=280 To 40 Step -1
If SPEED>0 Then Wait SPEED
Wait Vbl
If Mouse Key=1 Then Rainbow Del : Goto SETUP
Screen Display 0,128,Y,320,258
Next
For Y=0 To N*8
If SPEED>0 Then Wait SPEED
Screen Offset 0,0,Y
Wait Vbl
If Mouse Key=1 Then Rainbow Del : Goto SETUP
Next
Rainbow Del
'
SETUP:
FIRST=1
Unpack 12 To 1 : Screen Hide 1
Unpack 10 To 0 : Screen Hide 0
H=90 : LEVEL=1
'
Hide On : Curs Off : Paper 0 : CHEAT=0
Unpack 13 To 4
Screen Display 4,,50,,
Screen Display 1,,Screen Height-45,,
0 A$=Inkey$ : If A$="" Then Goto 0
If A$="2" Then MOUSE=1 : Goto 1
If A$="j" Then Gosub CHEAT
If A$<>"1" Then Goto 0
'
1 Fade 5 : Wait 75 : Screen To Front 2 : Screen 0
Limit Mouse 420,80 To 430,220 : Double Buffer
Bob 1,295,H,6
'
Screen 1
Paper 0 : Pen 1
'
Locate 28,27 : LVS=1 : Print LVS : Rem * Lives
Locate 43,27 : SCO=0 : Print SCO : Rem * Score
'
Locate 28,29 : PISS=1 : Print LEVEL : Rem * Level
Locate 43,29 : SHP=0 : Print SHP : Rem * Sheep
NEED=0 : HALF=0 : GOLD=0
'
YS=120 : XS=-150
'
INIT_AMMO[50]
AMO=50
DISPLAY_AMMO[AMO]
Screen Close 4
Screen Show 1
Screen Show 0
'
Do
If Y=1 Then XS=40
If X=1 Then YS=50
Dec YS : If YS=50 Then X=1
Inc XS : If XS=40 Then Y=1
Screen Display 1,,YS,,
Screen Display 0,,XS,,
Screen To Back 2
If Y=1 and X=1 Then Y=0 : X=0 : Goto 3
Wait Vbl
If Mouse Key=1 Then Y=1 : X=1
Loop
'
3 Screen Close 2
'
Track Stop
Screen Open 7,640,10,16,Hires
Screen Display 7,,218,,
Curs Off : Flash Off : Cls 0 : Paper 0 : Pen 2
Centre "Shivering Sheep!"
'
Gosub 20 : Goto 25
'
Procedure INIT_AMMO[N]
Global XAMO,YAMO,SXAMO,SYAMO,AMAX,AMO
'
XAMO=6 : YAMO=187 : SXAMO=561 : SYAMO=16
'
Cls 5,XAMO,YAMO To XAMO+SXAMO,YAMO+SYAMO
AMAX=N : AMO=AMAX
End Proc
Procedure DISPLAY_AMMO[A]
Global XAMO,YAMO,SXAMO,SYAMO,AMAX
If A<AMAX
C=XAMO+(SXAMO*A)/AMAX
Cls 0,C,YAMO To XAMO+SXAMO,YAMO+SYAMO
End If
End Proc
'
20 S=0 : BS=Rnd(10)+1
If BS<5 Then S=2
If BS=>5 Then S=3
If BS>10 Then S=4
If S=0 Then S=3
Screen 0 : POS=Int(Rnd(135)+30) : B=0
Bob 0,B,POS,S : Return
'
25 Rem ***
Global TIM,AMO,SHP,CHEAT,JO,X,Y,H,B,S
Repeat
Inc B
If LEVEL<2 Then Gosub LEVEL5
If LEVEL>2 Then WLEVEL
Screen 0 : Bob 0,B,Y,S : Screen 1
Wait Vbl
If B>260 Then Bell : Goto 50
A$=Inkey$
If A$="b" and CHEAT=1 Then AMO=50 : INIT_AMMO[50] : Wait 2
If A$="s" and CHEAT=1 Then Gosub HELLO : Goto 49
If A$=Chr$(27) Then End
'
If Mouse Key=1 and AMO>0 and D=0 Then Dec AMO : Gosub 60
' Read the joystick
27 J=Joy(1)
' UP
If J and 1 : Dec H : End If
' DOWN
If J and 2 : Inc H : End If
' FIRE
If J and 16 and MOUSE<>1 and AMO>0 and D=0 : Dec AMO : Gosub 60 : End If
'
If MOUSE=1 Then H=Y Screen(Y Mouse)
If MOUSE=1 Then Bob 1,295,Y Screen(Y Mouse),6
If MOUSE<>1 Then Bob 1,295,H,6
If MOUSE<>1 and H>175 Then H=175
If MOUSE<>1 and H<30 Then H=30
'
If R=1 Then Return
Until AMO=0 or SHP>24
If PISS>19 Then Goto 65
49 If SHP>24 Then Screen 1 : Locate 28,29 : PISS=PISS+1 : SCO=SCO+1000 : Print PISS : SHP=0 : Gosub LEVCOM : Screen 0 : Goto 25
If AMO=0 Then Goto AMMO
50 Goto 250
' Screen To Front 1 : Unpack 15 To 1 : Gosub 300 : Wait Key : Goto BEG
'
60 Shoot : Wait 2 : DISPLAY_AMMO[AMO] : Screen 0
Bob 1,284,H,7
Wait 5
Bob 1,290,H,6
' *****************************************************
D=270 : P=H-18
61 Screen 0 : D=D-10 : Inc B
Bob 9,D,P,8
C=Bob Col(0)
If C=-1 and S=2 Then Paste Bob B-30,Y-40,11 : Goto SCORE
If C=-1 and S=3 Then Paste Bob B-25,Y-25,12 : Goto SCORE
If C=-1 and S=4 Then Paste Bob B-25,Y-25,12 : Goto SCORE
If Y=POS-1 Then Y=POS+1 : Else Y=POS-1
Screen 0 : Bob 0,B,Y,S : Screen 1
If B>260 Then Goto 50
R=1 : Gosub 27 : R=0
If D=0 Then Return
If D<>0 Then Goto 61
'
Gosub 20
Return
'
SCORE:
Bob Off 0
Bob Off 9
R=1 : Gosub 27 : R=0
If S=2 Then SCO=SCO+50
If S=3 Then SCO=SCO+25
If S=4 Then SCO=SCO+500 : Inc GOLD
L=S
If SCO>999999 Then SCO=999999
D=0 : Gosub 20
SHP=SHP+1
If SHP=2 Then Gosub 400
If SHP=4 Then Gosub 410
If SHP=6 Then Gosub 400
If SHP=8 Then Gosub 410
If SHP=10 Then Gosub 400
If SHP=12 Then Gosub 410
If SHP=14 Then Gosub 400
If SHP=16 Then Gosub 410
If SHP=20 Then Gosub 400
If SHP=24 Then Gosub 410
'
Screen 1
'
If GOLD>4 Then GOLD=0 : Inc LVS : Locate 28,27 : Print LVS
'
62 Screen 1 : Locate 43,29 : Print " " : Locate 43,27 : Print SCO : Locate 43,29 : Print SHP
Screen 0 : Return
'
LEVCOM:
Unpack 11 To 3 : YS=-5
Do
Inc YS : If YS>38 Then Goto LEVELGO
Screen Display 3,,YS,,
Wait Vbl
Loop
'
LEVELGO:
YS=38 : Wait 25
Do
Dec YS : If YS=-5 Then Goto 65
Screen Display 3,,YS,,
Wait Vbl
Loop
'
65 If PISS>19 Then FINISH=1 : Goto 410 : Else Goto 62
'
LEVEL5:
If Y=POS-1 Then Y=POS+1 : Else Y=POS-1
Return
'
Procedure WLEVEL
If Y=POS-1 Then Y=POS+1 : Else Y=POS-1
End Proc
'
HELLO:
SHP=SHP+1
Locate 43,29 : Print SHP
Wait 5
If SHP>24 Then Bob Off 9 : Bob Off 0 : Return
Goto HELLO
'
CHEAT:
200 A$=Inkey$ : If A$="" Then Goto 200
If A$="e" Then Goto 205
Goto 230
'
205 A$=Inkey$ : If A$="" Then Goto 205
If A$="n" Then Goto 210
Goto 230
'
210 A$=Inkey$ : If A$="" Then Goto 210
If A$="n" Then Goto 215
Goto 230
'
215 A$=Inkey$ : If A$="" Then Goto 215
If A$="y" Then Goto 220
Goto 230
'
220 If CHEAT=0 Then CHEAT=1 : Goto 222
If CHEAT=1 Then CHEAT=0
SCN=21
Do
Inc SCN : If SCN=50 Then Goto 225
Screen Display 4,,SCN,,
Wait Vbl
Loop
'
222 SCN=50
Do
Dec SCN : If SCN=21 Then Goto 225
Screen Display 4,,SCN,,
Wait Vbl
Loop
'
225 Goto 0
'
230 T=0
If A$="2" Then MOUSE=1 : Goto 1
If A$<>"1" Then Goto 0
'
250 If LVS=1 Then Screen To Front 0 : Unpack 15 To 0 : Gosub 300 : Goto WAII
LVS=LVS-1 : Bob Off 9 : Bob Off 0 : Screen 1 : Locate 28,27 : Print LVS : Screen 0 : Gosub 20 : Goto 25
'
WAII:
If Mouse Key=1 Then Goto BEG
Goto WAII
'
300 Track Play 3
Locate 1,8 : Print " "
Locate 1,8 : Print SCO
Locate 1,9
If PISS<5 Then Print " Very Poor "
If PISS>4 and PISS<10 Then Print " Poor "
If PISS>9 and PISS<15 Then Print " Average "
If PISS>14 and PISS<20 Then Print " Good "
If PISS=20 Then Print " Excellent "
'
Return
'
400 Rem ** Move Text Screen ( OFF )
Screen To Front 0 : MV=218
Do
MV=MV-1
Screen Display 7,,MV,,
Wait Vbl
If MV=208 Then Return
Loop
'
410 Rem ** Move Text Screen ( ON )
Screen To Front 0 : MV=208
Screen 7 : Cls 0
If SHP=4 Then Centre "Extra Life Every 2500 Points!"
If SHP=8 Then Centre "50 Points Every Big Sheep Killed!"
If SHP=12 Then Centre "25 Points Every Small Sheep Killed!"
If SHP=16 Then Centre "500 Points Every Gold Sheep Killed"
If SHP=24 Then Centre "Get More Ammo at Gobeye's Gun Store!"
If FINISH=1 Then Centre "Congratulations! You've Done it!"
Do
MV=MV+1
Screen Display 7,,MV,,
Wait Vbl
If MV=218 Then If FINISH=1 Then Wait 100 : Goto 250 : Else Return
Loop
'
AMMO:
Screen Open 2,640,175,16,Hires
Screen Display 2,,40,,
AA=0 : AB=0 : AC=0 : AD=0 : AE=0
Cls 2 : Curs Off : Flash Off : Paper 2 : Pen 0 : Cls 2
Print : Print " GOBEYE'S GUN STORE"
Print : Print " You have";SCO;" points."
Print " I will convert your points into cash!"
Print : Print "